package package06章_面向对象编程_基础._05oop.exer1_methodMore._02_args;

/**
 * @ClassName: e_6_09ArgsTest
 * @Author 86132
 * @Package package06章_面向对象编程_基础.oop05.exer1_methodMore._02_args
 * @Date 2024/2/11 21:55
 * @description:
 */
public class e_6_09ArgsTest {
    public static void main(String[] args) {
        e_6_09ArgsTest test = new e_6_09ArgsTest();

        test.print();
        test.print(1);
    }


    public void print(int... nums) {

        System.out.println("1111------------");

        for (int i = 0; i < nums.length; i++) {
            System.out.println(nums[i]);
        }
    }

//    public void print(int[] nums) {
//        for (int i = 0; i < nums.length; i++) {
//            System.out.println(nums[i]);
//        }
//    }

    public void print(int i, int... nums) {

    }

    //编译不通过
//    public void print(int ... nums,int i){
//
//    }


    public void print(int i) {
        System.out.println("2222");
    }

    public void print(int i, int j) {
        System.out.println("3333");
    }
}
